package mc;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class securityAnnotationAscpect {
	private Authenticator auth=new Authenticator();
	@Pointcut("execution(* MessageCommunicator.deliver(..))")
	public void secureaccess() {}

	@Before("secureaccess()")
	public void secure(){
		System.out.println("*** Securing ");		
		auth.authenticate();
	}
	
}
